﻿@using StsServerIdentity.Views.Manage
@using StsServerIdentity.Resources
@inject LocService SharedLocalizer
@inject SignInManager<ApplicationUser> SignInManager
@{
    var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any();
}

<nav class="navbar navbar-light">
    <ul class="mr-auto navbar-nav">
        <li class="nav-item @ManageNavPages.IndexNavClass(ViewContext)"><a class="nav-link" asp-action="Index">@SharedLocalizer.GetLocalizedHtmlString("PROFILE")</a></li>
        <li class="nav-item @ManageNavPages.ChangePasswordNavClass(ViewContext)"><a class="nav-link" id="change-password" asp-action="ChangePassword">@SharedLocalizer.GetLocalizedHtmlString("PASSWORD")</a></li>
        @if (hasExternalLogins)
        {
            <li class="nav-item @ManageNavPages.ExternalLoginsNavClass(ViewContext)"><a class="nav-link" id="external-login" asp-action="ExternalLogins">@SharedLocalizer.GetLocalizedHtmlString("EXTERNAL_LOGINS")</a></li>
        }
        <li class="nav-item @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)"><a class="nav-link" asp-action="TwoFactorAuthentication">@SharedLocalizer.GetLocalizedHtmlString("2FA")</a></li>
        <li class="nav-item @ManageNavPages.PersonalDataNavClass(ViewContext)"><a class="nav-link" asp-action="PersonalData">@SharedLocalizer.GetLocalizedHtmlString("PERSONAL_DATA")</a></li>
    </ul>
</nav>